using Gateway.Domain.EFCore.Configuration;
using Gateway.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Gateway.Domain.Configuration;

/// <summary>
/// 工作流设计器
/// </summary>
public class WorkFlowDesignConfiguration : AggregateRootEntityConfiguration<WorkFlowDesign>
{
    public override void Configure(EntityTypeBuilder<WorkFlowDesign> builder)
    {
        builder.ToTable(t => t.HasComment("工作流设计器"));
        builder.Property(x => x.NodeName).HasMaxLength(500).IsRequired().HasComment("节点名称");
        builder.Property(x => x.Type).IsRequired().HasComment("节点类型  0 发起人   1 审批人  2 抄送人  4 条件分支");
        base.Configure(builder);
    }
}